//
// Created by gyc on 2020/11/19.
//

#include "../../common.h"

class Solution {
public:
    void moveZeroes(vector<int> &nums) {
        int fast = 0, slow = 0;
        while (fast < nums.size()) {
            if (nums[fast] != 0) {
                int temp = nums[slow];
                nums[slow++] = nums[fast];
                nums[fast] = temp;
            }
            ++fast;
        }
    }
};